//
//  SLTestCell.m
//  Objective-C
//
//  Created by 陆承东 on 2019/1/8.
//  Copyright © 2019 S_Line. All rights reserved.
//

#import "SLTestCell.h"

@implementation SLTestCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        [self initView];
    }
    
    return self;
}

- (void)initView {
    NSLog(@"----------> SLTestCell - initView");
    
    self.contentView.backgroundColor = [UIColor yellowColor];
    UIView *backView = [UIView new];
    backView.backgroundColor = [UIColor whiteColor];
    backView.layer.cornerRadius = 8;
    backView.layer.shadowColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.08].CGColor;
    backView.layer.shadowOffset = CGSizeMake(2, 5);
    backView.layer.shadowOpacity = 0.5;
    backView.layer.shadowRadius = 5;
    [self.contentView addSubview:backView];
    [backView mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(0);
        make.right.mas_equalTo(-15);
        make.height.mas_equalTo(80);
        make.bottom.mas_equalTo(-15);
    }];
    
    [self.contentView layoutIfNeeded];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
